﻿
@{
    ViewBag.Title = "博客管理";
    Layout = "";
}

<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="" />
<meta name="keywords" content="" />
<meta name="author" content="Your name" />
<link rel="shortcut icon" href="../favicon.ico">
<link rel="stylesheet" type="text/css" href="~/Content/css/demo.css" />
<link rel="stylesheet" type="text/css" href="~/Content/css/style.css" />
<link href='http://fonts.googleapis.com/css?family=Electrolize' rel='stylesheet' type='text/css' />
<script src="~/Scripts/ueditor/ueditor.config.js"></script>
<script src="~/Scripts/ueditor/ueditor.all.min.js"></script>
<link href="~/Scripts/ueditor/themes/iframe.css" rel="stylesheet" />
<script src="~/Scripts/ueditor/lang/zh-cn/zh-cn.js"></script>



<script type="text/javascript">
    var editor = new baidu.editor.ui.Editor({
        UEDITOR_HOME_URL: '/Scripts/ueditor/',//配置编辑器路径
        iframeCssUrl: '/Scripts/ueditor/themes/iframe.css',//样式路径
        initialContent: '',//初始化编辑器内容
        autoHeightEnabled: true,//高度自动增长
        minFrameHeight: 500,//最小高度
        autoFloatEnabled: true,
        initialFrameWidth: 690,

        initialFrameHeight: 483
    });
    editor.render('content');
</script>

<script>
    function checkform() {
        var u = document.getElementById("username");
        var reg = /^[a-z]{6,10}$/;
        var p1 = document.getElementById("passowrd");
        var p2 = document.getElementById("password1");
        if (!reg.test(u.value)) {
            alert("用户名为6-10个小写字母");
            return false;
        }
        if (p1.value != p2.value) {
            alert("两次密码不一致");
            return false;
        }
    }
</script>

<div id="editprofile" class="panel">
     <div class="content">
         <h2>修改信息</h2>
         <form name="form1" onSubmit="return checkform();" action="" method="get" enctype="multipart/form-data">
             <table>
                 <tr>
                     <td align="right">用户名</td>
                     <td align="left"><input type="text" id="user" name="user"></td>
                 </tr>
                 
                 <tr>
                     <td align="right">密码</td>
                     <td align="left"><input type="password" id="password" name="password"></td>
                 </tr>

                 <tr>
                     <td align="right">确认密码</td>
                     <td align="left"><input type="password" id="password1" name="password1"></td>
                 </tr>

                 <tr>
                     <td align="right">头像</td>
                     <td align="left"><input type="file" name="photo" id="photo" required="required"></td>
                 </tr>

                 <tr>
                      <td align="right">邮箱</td>
                      <td align="left"><input type="text" name="email" id="email"></td>
                 </tr>

                 <tr>
                      <td align="right">手机号</td>
                      <td align="left"><input type="text" name="phonenumber" id="phonenumber"></td>
                 </tr>

                 <tr>
                      <td></td>
                      <td><input type="submit" id="sb1" value="修改"> <input type="reset" value="重填"></td>
                 </tr>
             </table>
         </form>
     </div>
</div>


<div id="create" class="panel">
    <div class="content">
        <h2>新建博文</h2>
        <form name="form2" action="/WriteBlog/Index" method="post">
            标题：<input type="text" id="title" name="Title"><br>
            简介：<input type="text" id="synopsis" name="Synopsis" required="required"><br>
            推荐值：<input type="number" id="Star" name="Star" min="0" max="10" required="required"><br>
            图片：<input type="text" name="Image" required="required">                   
            正文：<script id="content" name="Content" required="required"></script><br>
            模块：<select style="width:auto;color:black;" id="Module" name="Module">
                <option value=1>学无止境</option>
                <option value=2>科学技术</option>
            </select>
            <input type="submit" id="sb2" value="发布" />
        </form>
    </div>
</div>

    <div id="manage" class="panel">
        <div class="content">
            <h2>管理博客</h2>
            
        </div>
    </div>

    <div id="header">
        <h1>个人博客管理</h1>
        <ul id="navigation">
            <li><a id="link-editprofile" href="#editprofile">修改信息</a></li>
            <li><a id="link-create" href="#create">新建博文</a></li>
            <li><a id="link-manage" href="#manage">管理博客</a></li>
        </ul>
    </div>


